#ifndef SYSTEMMACRO_H
#define SYSTEMMACRO_H

#include <QtGlobal>
#include <QThread>

extern QThread *globalUI;

#define DECLARE_GLOBALUI() QThread *globalUI = nullptr
#define INIT_GLOBALUI(thread) (globalUI = (thread))

#define CHECK_UI_THREAD() Q_ASSERT_X(QThread::currentThread()==globalUI,"","not in ui")
#define IS_UI_THREAD() (QThread::currentThread()==globalUI)

#endif // SYSTEMMACRO_H
